package number;
import java.util.Arrays;
public class copyarray {
	public static void main(String args[]) {//copyof
		int arr[]=new int[]{23,14,12};
		int newarr[]=Arrays.copyOf(arr, 5);
		for(int i=0;i<newarr.length;i++) {
			System.out.println(newarr[i]);	
		}
		System.out.println("-------");
		int txcc[]=new int[] {1,2,3,4,7};
		int newtxcc[]=Arrays.copyOfRange(txcc, 0, 1);
		for(int j=0;j<newtxcc.length;j++) {
			System.out.println(newtxcc);
		}
	}

}
